﻿Public Class ThisAddIn
    Private _pmToolBar As pmToolbar


    Dim firstButton As Office.CommandBarButton
    Dim moveButton As Office.CommandBarButton


    Private Sub ThisAddIn_Startup(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Startup
        ' Initialize the PMtoolbar
        _pmToolBar = New pmToolbar(Me.Application)
    End Sub

    Private Sub ThisAddIn_Shutdown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shutdown
        _pmToolBar = Nothing
    End Sub

    Private Sub OnMoveButtonClick(ByVal Ctrl As Office.CommandBarButton, ByRef CancelDefault As Boolean)
        MessageBox.Show("test")

        ' Create a new Appointment item and display it to the user.
        Dim outlookApp As Outlook.Application = DirectCast(Ctrl.Application, Outlook.Application)
        Dim newAppt As Outlook.AppointmentItem = DirectCast(outlookApp.CreateItem(Outlook.OlItemType.olAppointmentItem), Outlook.AppointmentItem)
        newAppt.Display(False)
    End Sub


End Class
